home *** CD-ROM | disk | FTP | other *** search
/ Adventures with Oslo: Tools & Gadgets / Adventures with Oslo - Tools and Gadgets.ISO / mac / Ad / Mod03 / Shop / wordpath.Dir / 00061.ls < prev    next >
Encoding:
Text File  |  1994-09-23  |  1.6 KB  |  55 lines

  1. on startMovie
  2.   global wordPath
  3.   set HC to the number of cast "handCursor"
  4.   cursor([HC, HC + 1])
  5.   puppetSprite(2, 1)
  6.   set the foreColor of sprite 2 to 149
  7.   set the backColor of sprite 2 to 255
  8.   repeat with i = 3 to 37
  9.     puppetSprite(i, 1)
  10.     set the foreColor of sprite i to 35
  11.     set the backColor of sprite i to 0
  12.   end repeat
  13.   updateStage()
  14.   set wordPath to "beg"
  15.   put "beg" into field "compoundWord"
  16. end
  17.  
  18. on selectWord
  19.   global wordPath
  20.   if the clickOn <> 0 then
  21.     set lastWord to the last word in wordPath
  22.     set thisWord to the name of cast the castNum of sprite the clickOn
  23.     if field "dictionary" contains lastWord & thisWord then
  24.       put lastWord & thisWord into field "compoundWord"
  25.       set the foreColor of sprite the clickOn to 149
  26.       set the backColor of sprite the clickOn to 255
  27.       puppetSound("nice pling.s")
  28.       updateStage()
  29.       put " " & thisWord after wordPath
  30.       if thisWord = "end" then
  31.         repeat with i = 2 to 37
  32.           puppetSprite(i, 0)
  33.         end repeat
  34.         set the foreColor of sprite 2 to 255
  35.         set the backColor of sprite 2 to 0
  36.         puppetSound("Ta Dah!.S")
  37.         continue()
  38.       end if
  39.     else
  40.       if (thisWord = lastWord) and (the number of words in wordPath > 1) then
  41.         set the foreColor of sprite the clickOn to 35
  42.         set the backColor of sprite the clickOn to 0
  43.         puppetSound("Poper.S")
  44.         updateStage()
  45.         set lastNum to the number of words in wordPath
  46.         delete word lastNum of wordPath
  47.         put the last word in wordPath into field "compoundWord"
  48.       else
  49.         puppetSound("Beebit.S")
  50.         updateStage()
  51.       end if
  52.     end if
  53.   end if
  54. end
  55.